varying vec4 diffuseCol, ambientCol;
varying vec3 normal, lightDir, halfVector;

float NdotL;	//==cos(N,L)
float NdotHV;	//for specular component, HV = half vector

void main(){
		
	//just perform diffuse and ambient col in vertex shader, computer spec lighting in pixel/fragment shader
	
	//see explanations of computations in perVertexLighting shaders
	normal = normalize(gl_NormalMatrix * gl_Normal);
	lightDir = normalize(vec3(gl_LightSource[0].position));	//cause we use eye coords
	
	halfVector = normalize(gl_LightSource[0].halfVector.xyz);
	
	diffuseCol = gl_FrontMaterial.diffuse * gl_LightSource[0].diffuse;
	
	ambientCol = gl_FrontMaterial.ambient * gl_LightSource[0].ambient + gl_LightModel.ambient * gl_LightSource[0].ambient;
	
	gl_Position = ftransform();	//don't alter vertex position
	
}